{extend name="main"}

{block name="content"}

{if auth('config')}
<div class="think-box-shadow margin-bottom-15">
    <span class="color-green font-w7 text-middle">系统参数配置：</span>
    <a class="layui-btn layui-btn-sm" data-modal="{:url('config')}">修改系统配置</a>
</div>
{/if}

<div class="think-box-shadow margin-bottom-15">
    <span class="color-green font-w7 text-middle">文件存储引擎：</span>
    {foreach ['local'=>'本地服务器存储','qiniu'=>'七牛云对象存储','oss'=>'阿里云OSS存储'] as $k=>$v}
    {if sysconf('storage_type') eq $k}
    {if auth('file')}<a data-modal="{:url('file')}?type={$k}" class="layui-btn layui-btn-sm">{$v}</a>{else}<a
        class="layui-btn layui-btn-sm">{$v}</a>{/if}
    {elseif auth('file')}<a data-modal="{:url('file')}?type={$k}"
                            class="layui-btn layui-btn-sm layui-btn-primary">{$v}</a>{/if}
    {/foreach}
</div>

<div class="think-box-shadow padding-40">
    <div class="layui-form-item">
        <span class="color-green font-w7">前台应用名称 App_name</span>
        <label class="relative block">
            <input readonly value="{:sysconf('app_name')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('app_name')}" class="fa fa-copy right-btn"></a>
        </label>
        <p class="help-block">网站名称及网站图标，将显示在浏览器的标签上</p>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">后台管理名称 Site_name</span>
        <label class="relative block">
            <input readonly placeholder="请输入程序名称" value="{:sysconf('site_name')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('site_name')}" class="fa fa-copy right-btn"></a>
        </label>
        <p class="help-block">管理程序名称，将显示在后台左上角标题</p>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">管理程序版本 Version</span>
        <label class="relative block">
            <input readonly value="{:sysconf('app_version')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('app_version')}" class="fa fa-copy right-btn"></a>
        </label>
        <p class="help-block">管理程序版本，将显示在后台左上角标题</p>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">首页公告内容</span>
        <label class="relative block">
            <input readonly value="{:sysconf('notice')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('notice')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">首页弹窗内容(为空不弹)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('popup')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('popup')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>
        
    <div class="layui-form-item">
        <span class="color-green font-w7">充值金额</span>
        <label class="relative block">
            <input readonly value="{:sysconf('czmoney')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('czmoney')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>
        
     <div class="layui-form-item">
        <span class="color-green font-w7">赠送彩金金额</span>
        <label class="relative block">
            <input readonly value="{:sysconf('cjrg')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('cjrg')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">起充金额(元)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('start_recharge')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('start_recharge')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">起提金额(元)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('start_withdrawal')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('start_withdrawal')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">最低收费(元)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('min_money')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('min_money')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">提现手续费(%)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('service_tx')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('service_tx')}" class="fa fa-copy right-btn"></a>
        </label>
        <p class="help-block">按需设置</p>
    </div>

    <div class="layui-form-item">
        <span class="color-green font-w7">充值手续费(%)</span>
        <label class="relative block">
            <input readonly value="{:sysconf('service_cz')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('service_cz')}" class="fa fa-copy right-btn"></a>
        </label>
        <p class="help-block">按需设置</p>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">trc20地址</span>
        <label class="relative block">
            <input readonly value="{:sysconf('trc')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('trc')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">erc20地址</span>
        <label class="relative block">
            <input readonly value="{:sysconf('erc')}" class="layui-input layui-bg-gray">
            <a data-copy="{:sysconf('erc')}" class="fa fa-copy right-btn"></a>
        </label>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">trc20充值流程图</span>
        <label class="relative block">
            <img alt="icon" data-tips-image style="height:auto;max-height:42px;min-width:42px" src="{:sysconf('trc_img')}"/>
        </label>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">erc20充值流程图</span>
        <label class="relative block">
            <img alt="icon" data-tips-image style="height:auto;max-height:42px;min-width:42px" src="{:sysconf('erc_img')}"/>
        </label>
    </div>
    <div class="layui-form-item">
        <span class="color-green font-w7">trc20充值流程图</span>
        <label class="relative block">
            <img alt="icon" data-tips-image style="height:auto;max-height:42px;min-width:42px" src="{:sysconf('usdt_img')}"/>
        </label>
    </div>
    
</div>
{/block}

{block name='style'}
<style>
    .right-btn {
        top: 0;
        right: 0;
        width: 38px;
        height: 38px;
        display: inline-block;
        position: absolute;
        text-align: center;
        line-height: 38px;
    }
</style>
<script>

    window.form.render();
</script>
<script>
    function clearData() {
        $.msg.confirm('确定要清理吗？', function (index) {
            //history.back();
            $.msg.close(index);
            var chk_value = [];
            $('input[name="clear"]:checked').each(function () {
                chk_value.push($(this).val());
            });

            console.log(chk_value)
            console.log(JSON.stringify(chk_value))
            $.ajax({
                type: 'POST',
                url: "{:url('clear')}",
                data: {
                    'id': 2,
                    'data': JSON.stringify(chk_value),
                    '_csrf_': "{:systoken('admin/config/clear')}"
                },
                success: function (res) {
                    layer.msg(res.info, {time: 2500});
                    //location.reload();
                }
            });


        }, function () {
            return false;
        });


    }
</script>
{/block}